
#include "nx_api.h"

#ifdef __PRODUCT_NETXDUO__

#include "netx_mdns_test.h"

/* Frame (86 bytes) */
static const unsigned char pkt1[86] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x56, 0x08, 0x00, 0x45, 0x00, /* "3DV..E. */
0x00, 0x48, 0x00, 0x07, 0x40, 0x00, 0xff, 0x11, /* .H..@... */
0xd9, 0xb7, 0xc0, 0xa8, 0x00, 0x42, 0xe0, 0x00, /* .....B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x34, /* .......4 */
0x03, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* .,...... */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x5f, /* ......._ */
0x70, 0x64, 0x6c, 0x2d, 0x64, 0x61, 0x74, 0x61, /* pdl-data */
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x04, 0x5f, /* stream._ */
0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, /* tcp.loca */
0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01              /* l..... */
};

/* Frame (496 bytes) */
static const unsigned char pkt2[496] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x1e, /* ..^..... */
0x8f, 0xb1, 0x7a, 0xd4, 0x08, 0x00, 0x45, 0x00, /* ..z...E. */
0x01, 0xe2, 0x77, 0x3a, 0x00, 0x00, 0xff, 0x11, /* ..w:.... */
0xa1, 0x28, 0xc0, 0xa8, 0x00, 0x04, 0xe0, 0x00, /* .(...... */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x01, 0xce, /* ........ */
0xee, 0x32, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, /* .2...... */
0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x5f, /* ......._ */
0x70, 0x64, 0x6c, 0x2d, 0x64, 0x61, 0x74, 0x61, /* pdl-data */
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x04, 0x5f, /* stream._ */
0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, /* tcp.loca */
0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, /* l....... */
0x11, 0x94, 0x00, 0x0f, 0x0c, 0x43, 0x61, 0x6e, /* .....Can */
0x6f, 0x6e, 0x4d, 0x46, 0x34, 0x35, 0x30, 0x30, /* onMF4500 */
0x77, 0xc0, 0x0c, 0x06, 0x72, 0x6f, 0x75, 0x74, /* w...rout */
0x65, 0x72, 0xc0, 0x21, 0x00, 0x01, 0x80, 0x01, /* er.!.... */
0x00, 0x00, 0x00, 0x78, 0x00, 0x04, 0xc0, 0xa8, /* ...x.... */
0x00, 0x04, 0xc0, 0x32, 0x00, 0x21, 0x80, 0x01, /* ...2.!.. */
0x00, 0x00, 0x00, 0x78, 0x00, 0x08, 0x00, 0x00, /* ...x.... */
0x00, 0x00, 0x23, 0x8c, 0xc0, 0x41, 0xc0, 0x32, /* ..#..A.2 */
0x00, 0x10, 0x80, 0x01, 0x00, 0x00, 0x11, 0x94, /* ........ */
0x01, 0x4e, 0x09, 0x74, 0x78, 0x74, 0x76, 0x65, /* .N.txtve */
0x72, 0x73, 0x3d, 0x31, 0x05, 0x6e, 0x6f, 0x74, /* rs=1.not */
0x65, 0x3d, 0x08, 0x71, 0x74, 0x6f, 0x74, 0x61, /* e=.qtota */
0x6c, 0x3d, 0x31, 0x0b, 0x70, 0x72, 0x69, 0x6f, /* l=1.prio */
0x72, 0x69, 0x74, 0x79, 0x3d, 0x31, 0x30, 0x11, /* rity=10. */
0x74, 0x79, 0x3d, 0x43, 0x61, 0x6e, 0x6f, 0x6e, /* ty=Canon */
0x20, 0x4d, 0x46, 0x34, 0x35, 0x37, 0x30, 0x64, /*  MF4570d */
0x77, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, /* w.produc */
0x74, 0x3d, 0x28, 0x43, 0x61, 0x6e, 0x6f, 0x6e, /* t=(Canon */
0x20, 0x4d, 0x46, 0x34, 0x35, 0x30, 0x30, 0x77, /*  MF4500w */
0x29, 0x1c, 0x70, 0x64, 0x6c, 0x3d, 0x61, 0x70, /* ).pdl=ap */
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, /* plicatio */
0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74, 0x2d, /* n/octet- */
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2a, 0x61, /* stream*a */
0x64, 0x6d, 0x69, 0x6e, 0x75, 0x72, 0x6c, 0x3d, /* dminurl= */
0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x72, /* http://r */
0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x6c, 0x6f, /* outer.lo */
0x63, 0x61, 0x6c, 0x2e, 0x2f, 0x74, 0x5f, 0x77, /* cal./t_w */
0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x67, /* elcom.cg */
0x69, 0x0d, 0x75, 0x73, 0x62, 0x5f, 0x4d, 0x46, /* i.usb_MF */
0x47, 0x3d, 0x43, 0x61, 0x6e, 0x6f, 0x6e, 0x27, /* G=Canon' */
0x75, 0x73, 0x62, 0x5f, 0x4d, 0x44, 0x4c, 0x3d, /* usb_MDL= */
0x43, 0x61, 0x6e, 0x6f, 0x6e, 0x20, 0x4d, 0x46, /* Canon MF */
0x34, 0x35, 0x30, 0x30, 0x77, 0x20, 0x53, 0x65, /* 4500w Se */
0x72, 0x69, 0x65, 0x73, 0x20, 0x28, 0x55, 0x46, /* ries (UF */
0x52, 0x49, 0x49, 0x20, 0x4c, 0x54, 0x29, 0x0d, /* RII LT). */
0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, /* transpar */
0x65, 0x6e, 0x74, 0x3d, 0x46, 0x08, 0x42, 0x69, /* ent=F.Bi */
0x6e, 0x61, 0x72, 0x79, 0x3d, 0x46, 0x06, 0x54, /* nary=F.T */
0x42, 0x43, 0x50, 0x3d, 0x46, 0x07, 0x43, 0x6f, /* BCP=F.Co */
0x6c, 0x6f, 0x72, 0x3d, 0x46, 0x08, 0x43, 0x6f, /* lor=F.Co */
0x70, 0x69, 0x65, 0x73, 0x3d, 0x54, 0x08, 0x44, /* pies=T.D */
0x75, 0x70, 0x6c, 0x65, 0x78, 0x3d, 0x54, 0x0d, /* uplex=T. */
0x50, 0x61, 0x70, 0x65, 0x72, 0x43, 0x75, 0x73, /* PaperCus */
0x74, 0x6f, 0x6d, 0x3d, 0x54, 0x06, 0x42, 0x69, /* tom=T.Bi */
0x6e, 0x64, 0x3d, 0x46, 0x09, 0x43, 0x6f, 0x6c, /* nd=F.Col */
0x6c, 0x61, 0x74, 0x65, 0x3d, 0x54, 0x06, 0x53, /* late=T.S */
0x6f, 0x72, 0x74, 0x3d, 0x54, 0x08, 0x53, 0x74, /* ort=T.St */
0x61, 0x70, 0x6c, 0x65, 0x3d, 0x46, 0x07, 0x50, /* aple=F.P */
0x75, 0x6e, 0x63, 0x68, 0x3d, 0x46, 0x11, 0x50, /* unch=F.P */
0x61, 0x70, 0x65, 0x72, 0x4d, 0x61, 0x78, 0x3d, /* aperMax= */
0x6c, 0x65, 0x67, 0x61, 0x6c, 0x2d, 0x41, 0x34  /* legal-A4 */
};

/* Frame (165 bytes) */
static const unsigned char pkt3[165] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x56, 0x08, 0x00, 0x45, 0x00, /* "3DV..E. */
0x00, 0x97, 0x00, 0x08, 0x40, 0x00, 0xff, 0x11, /* ....@... */
0xd9, 0x67, 0xc0, 0xa8, 0x00, 0x42, 0xe0, 0x00, /* .g...B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x83, /* ........ */
0x26, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* &3...... */
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x5f, /* ......._ */
0x70, 0x64, 0x6c, 0x2d, 0x64, 0x61, 0x74, 0x61, /* pdl-data */
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x04, 0x5f, /* stream._ */
0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, /* tcp.loca */
0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x0f, 0x5f, /* l......_ */
0x70, 0x64, 0x6c, 0x2d, 0x64, 0x61, 0x74, 0x61, /* pdl-data */
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x04, 0x5f, /* stream._ */
0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, /* tcp.loca */
0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, /* l....... */
0x11, 0x93, 0x00, 0x29, 0x0c, 0x43, 0x61, 0x6e, /* ...).Can */
0x6f, 0x6e, 0x4d, 0x46, 0x34, 0x35, 0x30, 0x30, /* onMF4500 */
0x77, 0x0f, 0x5f, 0x70, 0x64, 0x6c, 0x2d, 0x64, /* w._pdl-d */
0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, /* atastrea */
0x6d, 0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, /* m._tcp.l */
0x6f, 0x63, 0x61, 0x6c, 0x00                    /* ocal. */
};

/* Frame (165 bytes) */
static const unsigned char pkt4[165] = {
0x01, 0x00, 0x5e, 0x00, 0x00, 0xfb, 0x00, 0x11, /* ..^..... */
0x22, 0x33, 0x44, 0x56, 0x08, 0x00, 0x45, 0x00, /* "3DV..E. */
0x00, 0x97, 0x00, 0x09, 0x40, 0x00, 0xff, 0x11, /* ....@... */
0xd9, 0x66, 0xc0, 0xa8, 0x00, 0x42, 0xe0, 0x00, /* .f...B.. */
0x00, 0xfb, 0x14, 0xe9, 0x14, 0xe9, 0x00, 0x83, /* ........ */
0x26, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* &5...... */
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x5f, /* ......._ */
0x70, 0x64, 0x6c, 0x2d, 0x64, 0x61, 0x74, 0x61, /* pdl-data */
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x04, 0x5f, /* stream._ */
0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, /* tcp.loca */
0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x0f, 0x5f, /* l......_ */
0x70, 0x64, 0x6c, 0x2d, 0x64, 0x61, 0x74, 0x61, /* pdl-data */
0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x04, 0x5f, /* stream._ */
0x74, 0x63, 0x70, 0x05, 0x6c, 0x6f, 0x63, 0x61, /* tcp.loca */
0x6c, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, /* l....... */
0x11, 0x91, 0x00, 0x29, 0x0c, 0x43, 0x61, 0x6e, /* ...).Can */
0x6f, 0x6e, 0x4d, 0x46, 0x34, 0x35, 0x30, 0x30, /* onMF4500 */
0x77, 0x0f, 0x5f, 0x70, 0x64, 0x6c, 0x2d, 0x64, /* w._pdl-d */
0x61, 0x74, 0x61, 0x73, 0x74, 0x72, 0x65, 0x61, /* atastrea */
0x6d, 0x04, 0x5f, 0x74, 0x63, 0x70, 0x05, 0x6c, /* m._tcp.l */
0x6f, 0x63, 0x61, 0x6c, 0x00                    /* ocal. */
};

static MDNS_QUERY_INFO mdns_query = {NX_NULL, "_pdl-datastream._tcp", NX_NULL};

MDNS_TEST_SEQ mdns_query_pdl_datastream_tcp[] = {
    {TITLE, "Query _pdl-datastream._tcp", 26, 0},
    
    {MDNS_QUERY, (char*)&mdns_query, 0, 0},
    {MDNS_CHECK_DATA_V4, (char*)&pkt1[0], sizeof(pkt1), 5},
    {INJECT, (char*)&pkt2[0], sizeof(pkt2), 0},
    {MDNS_CHECK_DATA_V4, (char*)&pkt3[0], sizeof(pkt3), 5},
};

int mdns_query_pdl_datastream_tcp_size = sizeof(mdns_query_pdl_datastream_tcp) / sizeof(MDNS_TEST_SEQ);

#endif /* __PRODUCT_NETXDUO__  */

